/**
 * @author linq
 * cookie存储
 */

import Cookie from 'js-cookie'

/**
 * 存储
 */
export const setStore = (name, content) => {
  if (!name) return
  if (typeof content !== 'string') {
    content = JSON.stringify(content)
  }
  Cookie.set(name, content)
}

/**
 * 获取
 */
export const getStore = name => {
  if (!name) return
  return Cookie.get(name)
}

/**
 * 删除
 */
export const removeStore = name => {
  if (!name) return
  Cookie.remove(name)
}


